﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="选择合格原料.aspx.cs" Inherits="syc.Store.选择合格原料" %>
<html>
<head>
<title></title>
</head>
<body>
<script type="text/javascript" language="javascript" src="/common.js"></script>
<form id="form1" runat="server">
<div id="wintop" class="wintop">原料入库第一步：选择合格原料 注：填写原料入库单之前您需要从到货记录中选择要入库的原料</div>
<asp:Panel ID="Panel1" runat="server" CssClass="panel">
    <asp:Button ID="Button_NextStep" runat="server" Text="下一步 >>" CssClass="button" 
        Visible="false" onclick="Button_NextStep_Click" />
<input type="button" value="关 闭" class="button" onclick="parent.swin_close();" />
<asp:TextBox ID="SelectedList" runat="server" ReadOnly="true" Visible="false" Text=","></asp:TextBox>
</asp:Panel>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" 
    SelectCommand="SELECT [ID], [名称] FROM [原料供货单位]">
</asp:SqlDataSource>

<asp:SqlDataSource ID="SqlDataSource2" runat="server" 
    ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>" >
</asp:SqlDataSource>

<asp:Panel ID="Panel2" runat="server" CssClass="panel" GroupingText="合格原料到货单查询">
供货单位：<asp:DropDownList ID="GongHuo" runat="server" 
    DataSourceID="SqlDataSource1" DataTextField="名称" DataValueField="ID" Width="115px">
</asp:DropDownList>

原料类别：<asp:DropDownList ID="YuanLiao" runat="server" 
    DataSourceID="SqlDataSource2" DataTextField="品名" DataValueField="ID" Width="115px">
</asp:DropDownList>
开始日期：<asp:TextBox ID="Date1" runat="server" CssClass="intxt1" Width="115px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date1').value, document.getElementById('Date1'));" />
截止日期：<asp:TextBox ID="Date2" runat="server" CssClass="intxt1" Width="115px"></asp:TextBox><img alt="" src="/Icons/29.png" align="middle" onclick="makecalendar(document.getElementById('Date2').value, document.getElementById('Date2'));" />
<asp:Button ID="Button_Query" runat="server" CssClass="button" Text="查 询" 
        UseSubmitBehavior="true" onclick="Button_Query_Click" />

</asp:Panel>

<asp:Panel ID="Panel_Msg" runat="server" CssClass="panel2" Visible="false">
    <asp:Label ID="Message" runat="server" Text="·权限不足" CssClass="prompt"></asp:Label>
</asp:Panel>

<asp:Panel ID="Panel3" runat="server">

<div class="gridframe">
    <div class="gridview">
    
        <table border="1" width="100%" cellspacing="0" cellpadding="0" bordercolor="#e5cfab">
            <tr>
	            <td width="60%" class="grid-title">合格原料到货记录</td>
	            <td width="40%" class="grid-title">已选择</td>
	        </tr>
	        <tr>
	            <td class="grid-back">
	            
	            
	            <asp:SqlDataSource  ID="SqlDataSource3" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"
                            OnSelected="SqlDataSource3_Selected" >
                            </asp:SqlDataSource>
                         <asp:GridView ID="GridView1" runat="server" AllowPaging="True" 
                             AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            DataSourceID="SqlDataSource3" 
                            GridLines="None" ondatabound="GridView1_DataBound" 
                            onpageindexchanged="GridView1_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>
                                <asp:TemplateField HeaderText="" Visible="false">
                                    <ItemTemplate>
                                        <img src="/Icons/online.gif" style="margin-top:2px;" alt="" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="20px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="原料类别" SortExpression="品名">
                                    <ItemTemplate>
                                        <asp:Label ID="Label2" runat="server" Text='<%# Bind("品名") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="120px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="规格" SortExpression="规格" Visible="false">
                                    <ItemTemplate>
                                        <asp:Label ID="Label3" runat="server" Text='<%# Bind("规格") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="供货单位" SortExpression="供货单位">
                                    <ItemTemplate>
                                        <asp:Label ID="Label4" runat="server" Text='<%# Bind("供货单位") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>   
                                
                                
                                <asp:TemplateField HeaderText="车号" SortExpression="车号">
                                    <ItemTemplate>
                                        <asp:Label ID="Label5" runat="server" Text='<%# Bind("车号") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="磅量" SortExpression="磅量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label6" runat="server" Text='<%# Bind("磅量") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="right" Width="80px" />
                                </asp:TemplateField>  
   
                                <asp:TemplateField HeaderText="到货日期" SortExpression="到货日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label7" runat="server" Text='<%# Bind("到货日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>   
                          
                              
                                <asp:TemplateField HeaderText="合格">
                                    <ItemTemplate>
                                        <img src="/images/true.png" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="center" Width="50px" />
                                </asp:TemplateField> 
                          
                                <asp:TemplateField HeaderText="操作" ShowHeader="true" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="Button_Pick" runat="server" CommandName='<%# Eval("ID") %>' 
                                            Text="选取>>" CssClass="smallbutton" onclick="Button_Pick_Click" />

                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                          
                          
         
                          
                            </Columns>
                          </asp:GridView>
	            
	            
	            
	            
	            
	            
	            
	            
	            </td>
	            <td class="grid-back">
	            
	            
	            
	            
	            
	            
	            <asp:SqlDataSource  ID="SqlDataSource4" runat="server" 
                            ConnectionString="<%$ ConnectionStrings:SCMConnectionString1 %>"
                            OnSelected="SqlDataSource4_Selected" >
                            </asp:SqlDataSource>
                         <asp:GridView ID="GridView2" runat="server" AllowPaging="True" 
                             AutoGenerateColumns="False" CssClass="grid" DataKeyNames="ID" 
                            DataSourceID="SqlDataSource4" 
                            GridLines="None" ondatabound="GridView2_DataBound" 
                            onpageindexchanged="GridView2_PageIndexChanged" AllowSorting="True" 
                            UseAccessibleHeader="False" >
                            <PagerSettings Visible="False" />
                            <RowStyle CssClass="grid-row-normal" />
                            <SelectedRowStyle   CssClass="grid-row-bright" />
                            <Columns>

                                <asp:TemplateField HeaderText="操作" ShowHeader="true" ItemStyle-CssClass="grid" HeaderStyle-CssClass="grid-header" ItemStyle-Width="80" ItemStyle-HorizontalAlign="Center">
                                    <ItemTemplate>
                                        <asp:Button ID="Button_UnPick" runat="server" CommandName='<%# Eval("ID") %>' 
                                            Text="<<取消" CssClass="smallbutton" onclick="Button_UnPick_Click" />
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="80px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="车号">
                                    <ItemTemplate>
                                        <asp:Label ID="Label8" runat="server" Text='<%# Bind("车号") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>
                                
                                <asp:TemplateField HeaderText="磅量">
                                    <ItemTemplate>
                                        <asp:Label ID="Label9" runat="server" Text='<%# Bind("磅量") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="right" Width="80px" />
                                </asp:TemplateField>  
   
                                <asp:TemplateField HeaderText="到货日期">
                                    <ItemTemplate>
                                        <asp:Label ID="Label10" runat="server" Text='<%# Bind("到货日期","{0:D}") %>'></asp:Label>
                                    </ItemTemplate>
                                    <HeaderStyle CssClass="grid-header" />
                                    <ItemStyle CssClass="grid" HorizontalAlign="Center" Width="100px" />
                                </asp:TemplateField>   

                            </Columns>
                          </asp:GridView>
	            
	            
	            
	            
	            
	            
	            
	            </td>
            </tr>
            <tr>
	            <td>   
	                <table width="100%">
	                    <tr>
	                        <td class="pagebar">
                                <asp:Button ID="Button_Pager_First" runat="server" Text="" ToolTip="首页" 
                                    CssClass="pageturn-first-b" onclick="Pager_Click" CommandName="--" />
                                <asp:Button ID="Button_Pager_Prev" runat="server" Text="" ToolTip="上一页" 
                                    CssClass="pageturn-prev-b" onclick="Pager_Click" CommandName="-" />
                                <input type="button" class="page-split" disabled />第<asp:TextBox ID="TextBox_Pager" runat="server" CssClass="pageturn" 
                                    ontextchanged="Pager_Click"></asp:TextBox>页<input type="button" class="page-split" disabled /><asp:Label ID="Label_Pages" runat="server"></asp:Label><input type="button" class="page-split" disabled />
                                
                                <asp:Button ID="Button_Pager_Next" runat="server" Text="" ToolTip="下一页" 
                                    CssClass="pageturn-next-b" onclick="Pager_Click" CommandName="+" />
                                <asp:Button ID="Button_Pager_Last" runat="server" Text="" ToolTip="末页" 
                                    CssClass="pageturn-last-b" onclick="Pager_Click" CommandName="++" /><input type="button" class="page-split" disabled />
                            </td>
                            <td class="pagebar" align="right">
                                <asp:Label ID="Label_Total" runat="server"></asp:Label>
                            </td>
                        </tr>
                   </table>

	            </td>



	            <td>   
	                <table width="100%">
	                    <tr>
	                        <td class="pagebar">
                                <asp:Button ID="Button_Pager_First2" runat="server" Text="" ToolTip="首页" 
                                    CssClass="pageturn-first-b" onclick="Pager2_Click" CommandName="--" />
                                <asp:Button ID="Button_Pager_Prev2" runat="server" Text="" ToolTip="上一页" 
                                    CssClass="pageturn-prev-b" onclick="Pager2_Click" CommandName="-" />
                                <input type="button" class="page-split" disabled />第<asp:TextBox ID="TextBox_Pager2" runat="server" CssClass="pageturn" 
                                    ontextchanged="Pager2_Click"></asp:TextBox>页<input type="button" class="page-split" disabled /><asp:Label ID="Label_Pages2" runat="server"></asp:Label><input type="button" class="page-split" disabled />
                                
                                <asp:Button ID="Button_Pager_Next2" runat="server" Text="" ToolTip="下一页" 
                                    CssClass="pageturn-next-b" onclick="Pager2_Click" CommandName="+" />
                                <asp:Button ID="Button_Pager_Last2" runat="server" Text="" ToolTip="末页" 
                                    CssClass="pageturn-last-b" onclick="Pager2_Click" CommandName="++" />
                            </td>
                            <td class="pagebar" align="right">
                                <asp:Label ID="Label_Total2" runat="server"></asp:Label>
                            </td>
                        </tr>
                   </table>

	            </td>
	            
	            
	            
	            
            </tr>
        </table>
    </div>
</div>
</asp:Panel>

</form>
<script>
    var textboxs = document.getElementsByTagName("input");
    var i;
    for (i = 0; i < textboxs.length; i++) {
        if (textboxs[i].className == "textbox") {
            textboxs[i].onchange = function(e) { this.className = "textbox-changed"; };
            textboxs[i].onfocus = function(e) { this.select(); };
        }
        else if (textboxs[i].className == "pageturn" || textboxs[i].className == "intxt1" || textboxs[i].className == "intxt2") {
            textboxs[i].onfocus = function(e) { this.select(); };
        }
    }

    var tds = document.getElementsByTagName("td");
    for (i = 0; i < tds.length; i++) {
        if (tds[i].className == "detailheader") {
            tds[i].innerHTML = tds[i].innerHTML.replace("*", "<span class=required>*</span>");
        }
    }

</script>
</body>
</html>
